#pragma once

#include "StdAfx.h"
#include <afxext.h>
#include "Resource.h"
#include <vector>
#include "PngButton.h"



 
/////////////////////////////////////////////////////////////////////////////
// CDlgView view
class CDockPaneXmlCmd;
class CDlgPanelView : public CFormView//public CScrollView
{
	friend class CDockPaneXmlCmd;//

protected:
	CDlgPanelView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CDlgPanelView)
	enum {IDD = IDD_FORMVIEW};
// Attributes
 
protected:
	CSize m_ViewTotalSize; 
 
private:
	int m_curSel;//curCheck;
// Operations
public:
	void SetPanelScrollSize(CSize sz,bool bInvalidate=true);

protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual void OnInitialUpdate();     // first time after construct
	afx_msg void OnClickBtn(UINT id);
	
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CDlgPanelView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CDlgView)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void PreSubclassWindow();
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);

	

public:
	static UINT ID_BTN_CMDS;
	static UINT ID_BTN_CMDS_MAX;
public:
	int CalcCtrlPos();
	CArray<CPngButton*> m_btns;
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	void OnSize(UINT nType, int cx, int cy);
	void CalcBtnPos();

	void ResetContent();
	void CreateBtns(int n,CString strPre);
	void AddBtns(int n, CString strPre);
	int m_nBtnCount;

	int m_btnHeight ;
	int m_btnWidth ;
	int m_btnVGap ;
	
};


/////////////////////////////////////////////////////////////////////////////
// CDlgDocument document

class CDlgDocument : public CDocument
{
	friend class CDockPaneXmlCmd;
protected:
	CDlgDocument();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CDlgDocument)

	// Attributes
public:

	// Operations
public:

	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgDocument)
public:
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
protected:
	virtual BOOL OnNewDocument();
	//}}AFX_VIRTUAL

	// Implementation
public:
	virtual ~CDlgDocument();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	
	// Generated message map functions
protected:
	//{{AFX_MSG(CDlgDocument)
	// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

 
};
 
 
